package com.blood.core.enums;

import java.util.ArrayList;
import java.util.List;

/**
 * @author daoren
 * @date 2021/3/3 10:30
 * @description 状态
 */
public enum PregnancyStatusEnum {
    NORMAL(1, "正常"),
    EARLY(2, "预警"),
    RISK(3, "危险预警"),
    DISCHARGED(4, "已出院"),
    ;

    private Integer value;
    private String name;

    PregnancyStatusEnum(Integer value, String name) {
        this.name = name;
        this.value = value;
    }

    public static PregnancyStatusEnum find(Integer value) {
        PregnancyStatusEnum[] var1 = values();
        int var2 = var1.length;
        for (int var3 = 0; var3 < var2; ++var3) {
            PregnancyStatusEnum status = var1[var3];
            if (status.value.equals(value)) {
                return status;
            }
        }
        return DISCHARGED;
    }

    public static List<Integer> getAbnormalStatusList() {
        List<Integer> list = new ArrayList<>();
        list.add(EARLY.getValue());
        list.add(RISK.getValue());
        return list;
    }

    public Integer getValue() {
        return this.value;
    }

    public String getName() {
        return this.name;
    }
}
